#include <string>
#include <map>



class GradeSummary
  {
  public:
    GradeSummary(const std::wstring& i_file_name);
    double GetAverage() const;

    struct FileAccessError{ };
    struct FileFormatError{size_t m_nline;};
    struct GrageOutOfRangeError{size_t m_nline;};
    struct SubjectTwice{size_t m_nline;};
  private:
    std::map<std::string, int> m_grades;
    double m_average;
    std::wstring m_file_name;
    size_t m_subject_num;

    void _ReadFile();
    void _ComputeAverage();
  };